<?php $sku = $product_array->sku; ?>

<body class="catalog-product-view catalog-product-view product-<?php echo $sku; ?>">              
<script type="text/javascript" src="<?php echo base_url('skin/js/specification.js'); ?>"></script>
<!--- Specification header ---->
        <div class="breadcrumbs shadow fluid-width">
		<div class="fixed-width center">
			<div class="crumbs"><h2><span class="icon crumbs gallery"></span> <a href="">GoGADGETS gallery</a></h2>
            <p class=" marg0 font14 phoneName"> > <?php echo $product_array->name; ?></p>
            
            </div>            
            
		</div>
	</div>
<!--- Specification header ---->


<div class="fluid-width carousel-bg shadow z9 pull-left">		
	<div class="fixed-width center carousel-main-content">
	   <div id="myCarousel" class="carousel two slide">			        
	    <div class="carousel-holder carousel-inner">
		<div class="item active">
			<div class="hero-media">
				<img id="spec-img" src="<?php echo $product_array->imageurl; ?>" alt="<?php echo $product_array->name; ?>">
				<p class="thumbs">
					<a data-img="<?php echo $product_array->imageurl; ?>" href="<?php echo $product_array->imageurl; ?>" class="selected" rel="product_thumb_group"><img src="<?php echo $product_array->thumbnail; ?>" height="50" width="50" alt=""></a>
				</p>
			</div>
			    
		 <h2 id="phone_Name"><?php echo $product_array->name; ?></h2>	        
			    

<script type="text/javascript">
jQuery(document).ready(function() {

   jQuery('.online-gallery ul').on('swipeleft swiperight', function(e) {
		e.stopPropagation();
 		e.preventDefault();
   });

	jQuery('a#like').click(function(){

	   var likelink = jQuery(this);
	   if( likelink.hasClass("clicked") ) { return false }
	   else { likelink.addClass("clicked"); }
	 	jQuery.ajax({
	     		 type: 'GET',
    			 dataType: 'jsonp',
	                 url: '<?php echo $maitai_like_url; ?>',
	                 error:    function(result) {
			        	function numberWithCommas(x) {
	                		return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
	               		}
					var count = parseInt(jQuery('span#count').text())+1;
					jQuery('span#count').text(count);
	                		var date = new Date();
			       		date.setTime(date.getTime()+((1*24*60*60*1000)+6));
			        	var expires = date.toGMTString();
	                
	                if(likelink.html()=="Like"){
		              likelink.html("Liked");
	 		      document.cookie="<?php echo $sku; ?>=" + "liked;" + "expires=" + expires + "; path=/";
		        }
	                else{
			     likelink.html("Like");
	                     document.cookie="<?php echo $sku; ?>=" + "like;" + "expires=" + expires + "; path=/";
			}

		          }
		         }); // End Ajax  

	     }); // End onclick
   
   var allcookies = document.cookie;
   //alert("All Cookies : " + allcookies );

   // Get all the cookies pairs in an array
   cookiearray  = allcookies.split(';');

   // Now take key value pair out of this array
   for(var i=0; i<cookiearray.length; i++){
      name = cookiearray[i].split('=')[0];
      value = cookiearray[i].split('=')[1];
      name=name.replace(/ /, '');
      
      if(name == "<?php echo $sku; ?>"){
      	jQuery('a#like').html(value);
	if(value=="liked")
        jQuery('a#like').addClass("clicked");
       //alert("EQ Key is : (" + name + ") and Value is : " + value);
      }
      else{
       //alert("NOT Key is : (" + name + ") and Value is : " + value);
      }
   }
	

});

</script>
                          
                <div id="like-container-product">
				    <a id="like" href="#" onclick="javascript: return false;">Like</a>
					<span class="bethefirsttolike"><span class="arrowLeft"></span><span class="likeTxt" id="count"><?php echo $product_array->like; ?></span></span>		        
				</div>

				<?php /* ?><p class="por-768">1 customer bought this product</p><?php */ ?>
			    			    
			    <!--h2 style="margin-top: 40px;line-height:0px"--><h2 class="marg20TopImp"><?php $price = number_format($product_array->price,2); ?><?php echo (($price=="0.00") ? "<span id='price'>FREE</span>" : "<span id='price'>P$price</span>"); ?></h2>
			    
				<!-- <a class="btn large" href="http://www.globe.com.ph/mysuperplan" onclick="javascript:_paq.push(['setCustomVariable', 3, _session, 'Get the phone with a Plan,<?php echo $sku; ?>,maitai product-page ', 'page']); _paq.push(['setCustomVariable', 1, _session, window.location.href,'page']); /*_paq.push(['trackLink']);*/"><span class="icon other arrow"></span> Get this with a Plan</a> -->						

			
			    <a class="buttonBlue large font14 h22" id="getgadget" href="<?php echo $maitai_get_this_url; ?>" style="margin-top: 40px"><span id="getgadget2">Get this gadget now</span></a>						
						
						
				<a href="#" class="buttonBlue large nomarginleft compare-sku font14 h22" id="<?php echo $sku; ?>">Add to compare</a>
										
				<div class="social-sharing">
					<!-- AddThis Button BEGIN -->
					<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url="http://shop.globe.com.ph/<?php echo $sku; ?>.html">
					<a class="addthis_button_email mail" id="email_btn" ></a>
					<a class="addthis_button_facebook fb" id="fb_btn"></a>
					<a class="addthis_button_twitter tw" id="twitter_btn"></a>
					<a class="addthis_button_compact other" id="share_btn"></a>
					</div>
					<!-- AddThis Button END -->
                </div>
			    <!--onclick=""-->
					</div>
			    </div>
			</div>

		</div>
	</div>





<div class="fluid-width shadow z8 pull-left" style=""><span class="lavaL"></span>
    	<span class="lavaR"></span>
		<div class="fixed-width center z7 posRel">
			<p class="box-title fluid-width mbottom45">SPECIFICATIONS</p>
			
			<div class="product-postpaid-box-left pull-left">

				<div class="grey-line"></div>

				<div class="product-postpaid-spec-box">
					<p class="pp-spec-box-title purple"><span class="icon size"></span>SIZE</p>
					<div class="pp-spec-box-content">
						<p><span class="checkLists"></span><strong>Dimension:</strong> <?php echo $product_array->Size->Dimension; ?></p>
						<p><span class="checkLists"></span><strong>Weight:</strong> <?php echo $product_array->Size->Weight; ?> g</p>
					</div>
				</div>

				<div class="product-postpaid-spec-box">
					<p class="pp-spec-box-title red"><span class="icon battery"></span> BATTERY</p>
					<div class="pp-spec-box-content">
						<p><span class="checkLists"></span><strong>Talk Time:</strong> <?php echo $product_array->Battery->Talk_Time; ?></p>
						<p><span class="checkLists"></span><strong>Stand By Time:</strong> <?php echo $product_array->Battery->Stand_By_Time; ?></p>
					</div>
				</div>
				
				<div class="product-postpaid-spec-box box-last">
					<p class="pp-spec-box-title pink"><span class="icon media"></span> MEDIA</p>
					<div class="pp-spec-box-content">
						<p><span class="checkLists"></span><strong>Camera:</strong> <?php echo $product_array->Media->Camera; ?></p>
						<p><span class="checkLists"></span><strong>Secondary Camera:</strong> <?php echo $product_array->Media->Secondary_Camera; ?></p>
						<p><span class="checkLists"></span><strong>Video/Video Calling/Radio:</strong> <?php echo str_replace("_" , " / " , $product_array->Media->Video__Video_Calling__Radio); ?></p>
						<p><span class="checkLists"></span><strong>Loudspeaker/3.5mm jack:</strong> <?php echo str_replace("_" , " / " , $product_array->Media->Loudspeaker__35mm_jack); ?></p>
						<p><span class="checkLists"></span><strong>Flash/Media Player/Games:</strong> <?php echo str_replace("_" , " / " , $product_array->Media->Flash__Media_Player__Games); ?></p>
						<p><span class="checkLists"></span><strong>Alert Types:</strong> <?php echo $product_array->Media->Alert_Types; ?></p>
						<p><span class="checkLists"></span><strong>Touch Screen/Qwerty:</strong> <?php echo str_replace("_" , " / " , $product_array->Media->Touch_Screen__Qwerty); ?></p>
					</div>
				</div>
			</div>

			<div class="product-postpaid-box-right pull-right">
			
				<div class="grey-line"></div>

				<div class="product-postpaid-spec-box">
					<p class="pp-spec-box-title green"><span class="icon display"></span> DISPLAY</p>
					<div class="pp-spec-box-content">
						<p><span class="checkLists"></span><strong>Display:</strong> <?php echo $product_array->Display->Display; ?></p>
						<p><span class="checkLists"></span><strong>Size:</strong> <?php echo $product_array->Display->Size; ?></p>
					</div>
				</div>
				
				<div class="product-postpaid-spec-box">
					<p class="pp-spec-box-title yellow"><span class="icon memory"></span> MEMORY</p>
					<div class="pp-spec-box-content">
						<p><span class="checkLists"></span><strong>Internal:</strong> <?php echo $product_array->Memory->Internal; ?></p>
						<p><span class="checkLists"></span><strong>Card Slot:</strong> <?php echo $product_array->Memory->Card_Slot; ?></p>
					</div>
				</div>
				
				<div class="product-postpaid-spec-box box-last">
					<p class="pp-spec-box-title grey"><span class="icon features"></span> FEATURES</p>
					<div class="pp-spec-box-content">
						<p><span class="checkLists"></span><strong>OS:</strong> <?php echo $product_array->Features->OS; ?></p>
						<p><span class="checkLists"></span><strong>CPU:</strong> <?php echo $product_array->Features->CPU; ?></p>
						<p><span class="checkLists"></span><strong>Java:</strong> <?php echo $product_array->Features->Java; ?></p>
						<p><span class="checkLists"></span><strong>Messaging:</strong> <?php echo $product_array->Features->Messaging; ?></p>
						<p><span class="checkLists"></span><strong>Connectivity:</strong> <?php echo $product_array->Features->Connectivity; ?></p>
					</div>
				</div>
			</div>
		</div>

	</div>
    
<?php if ($has_reco): ?>    
    <div class="fluid-width gradient-orangepink z7 shadow pull-left" id="reco-container-product">
		<div class="fixed-width center">
			<p style="color:#000" class="box-title-small box-title fluid-width">
				<a id="b-you-might" href="#" onclick="javascript: return false;" style="color: #1853A3;">You Might Also Like</a>
				<span id="sep" style="color: white; display: none;">&nbsp;&nbsp;|&nbsp;&nbsp;</span>	
				<a id="b-recently-viewed" href="#" onclick="javascript: return false;" style="color: rgb(0, 0, 0); display: none;">Recently Viewed</a>
			</p>

			<div class="online-gallery" style="visibility: visible; overflow: hidden; position: relative; z-index: 2; left: 0px; width: 904px;">
			   <div id="b-you-might">
				
					<script type="text/javascript">
					transaction_id = "<?php echo $reco_transaction_id; ?>";
					_session = "<?php echo $this->session->userdata('session_id'); ?>";
					</script>				
				
					<ul class="products-grid" style="margin: 0px; padding: 0px; position: relative; list-style-type: none; z-index: 1; width: 904px; left: 0px;">
					<?php //var_dump($reco_items); ?>
					<?php foreach ($reco_items as $reco_item): ?>
						<?php
							if(!$reco_item) continue;	// SKIP KUNG EMPTY ARRAY
						
							$reco_item_sku = $reco_item->sku;
							$reco_item_name = $reco_item->name;
							$reco_item_url = base_url() . "index.php/specification/" . $reco_item_sku;
						?>					
						
						<li class="item" style="width: 186px; overflow: visible; float: left;">
						<a href="<?php echo base_url() . "index.php/specification/" . $reco_item_sku; ?>" onclick="_paq.push(['setCustomVariable', 3, _session , 'Recommended Items , <?php echo $reco_item_sku; ?> , maitai product-page', 'page']); _paq.push(['setCustomVariable', 5, 'transaction_id', transaction_id, 'page']); _paq.push(['setCustomVariable', 1, _session, window.location.href,'page']); _paq.push(['trackLink']);" title="<?php echo $reco_item_name; ?>" class="product-image">
							<img src="<?php echo $reco_item->imageurl; ?>" width="135" height="135" alt="<?php echo $reco_item_name; ?>">
						</a>
						
						<h3 class="product-name">
							<a href="$reco_item_url" onclick="_paq.push(['setCustomVariable', 3, _session , 'Recommended Items , <?php echo $reco_item_sku; ?> , maitai product-page', 'page']); _paq.push(['setCustomVariable', 5, 'transaction_id', transaction_id, 'page']); _paq.push(['setCustomVariable', 1, _session, window.location.href,'page']); _paq.push(['trackLink']);" title="<?php echo $reco_item_name; ?>">
								<?php echo $reco_item_name; ?>
							</a>
<script type="text/javascript">
	jQuery(document).ready(function() {
	   jQuery('#<?php echo "galleryadd-" . $reco_item_sku; ?>').click(function(){

	     var sku = "<?php echo $reco_item_sku; ?>";
	     var maitainumbercompare = getCookie("maitainumbercompare");

	     if(maitainumbercompare=="" || maitainumbercompare=="0") {
			document.cookie="maitainumbercompare=" + "1" + "; path=/";
			document.cookie="maitaicompare1=" + sku + "; path=/";
	     }

	     if(maitainumbercompare=="1") {
			document.cookie="maitainumbercompare=" + "2" + "; path=/";
			document.cookie="maitaicompare2=" + sku + "; path=/";
	     }
	     
	     if(maitainumbercompare=="2") 
	        alert("The comparison list is full.");	     
	        window.location="<?php echo base_url(); ?>index.php/compare";
		  
	   });
	});
	</script>
						</h3>
						
						<h3 class="product-like"><?php echo $reco_item->like; ?> likes</h3>		        
						                
						<div class="customer-ctrl">
					        <!-- <a href="#" class="add-to-compare" onclick="javascript:_paq.push(['setCustomVariable', 3, _session, 'Add to Compare , <?php echo $reco_item_sku; ?> , maitai product-page , Recommended Items', 'page']); _paq.push(['setCustomVariable', 5, 'transaction_id', transaction_id, 'page']); _paq.push(['setCustomVariable', 1, _session , window.location.href,'page']); _paq.push(['trackLink']);"><span>Add to Compare</span></a> -->
						<?php if(!isset($_COOKIE['maitainumbercompare']) || $_COOKIE['maitainumbercompare']=="0"): ?>
						<a class="add-to-compare" id="<?php echo "galleryadd-" . $reco_item_sku; ?>" onclick="javascript:_paq.push(['setCustomVariable', 3, _session, 'Add to Compare , <?php echo $sku; ?> , maitai gallery-page , bestsellers', 'page']); _paq.push(['setCustomVariable', 1, _session , window.location.href,'page']); _paq.push(['trackLink']);"><span>Add to Compare</span></a>
						<a class="remove-to-compare" id="<?php echo "galleryremove-" . $reco_item_sku; ?>" style="display:none;"><span>Remove from Comparison</span></a>
						<?php endif;?>

						<?php if(isset($_COOKIE['maitainumbercompare']) && $_COOKIE['maitainumbercompare']=="1"): ?>
						  <?php //var_dump($reco_item);?>
						  <?php if($_COOKIE['maitaicompare1']==$reco_item_sku): ?>
						     <a class="add-to-compare" id="<?php echo "galleryadd-" . $reco_item_sku; ?>" style="display:none;" onclick="javascript:_paq.push(['setCustomVariable', 3, _session, 'Add to Compare , <?php echo $sku; ?> , maitai gallery-page , bestsellers', 'page']); _paq.push(['setCustomVariable', 1, _session , window.location.href,'page']); _paq.push(['trackLink']);"><span>Add to Compare</span></a>
						     <a class="remove-to-compare" id="<?php echo "galleryremove-" . $sku; ?>"><span>Remove from Comparison</span></a>
						  <?php else: ?>
						     <a class="add-to-compare" id="<?php echo "galleryadd-" . $reco_item_sku; ?>" onclick="javascript:_paq.push(['setCustomVariable', 3, _session, 'Add to Compare , <?php echo $sku; ?> , maitai gallery-page , bestsellers', 'page']); _paq.push(['setCustomVariable', 1, _session , window.location.href,'page']); _paq.push(['trackLink']);"><span>Add to Compare</span></a>
						     <a class="remove-to-compare" id="<?php echo "galleryremove-" . $sku; ?>" style="display:none;"><span>Remove from Comparison</span></a>
						  <?php endif;?>
						<?php endif;?>

						<?php if(isset($_COOKIE['maitainumbercompare']) && $_COOKIE['maitainumbercompare']=="2"): ?>
						  <?php if($_COOKIE['maitaicompare1']==$reco_item_sku || $_COOKIE['maitaicompare2']==$reco_item_sku): ?>
						     <a class="add-to-compare" id="<?php echo "galleryadd-" . $reco_item_sku; ?>" style="display:none;" onclick="javascript:_paq.push(['setCustomVariable', 3, _session, 'Add to Compare , <?php echo $sku; ?> , maitai gallery-page , bestsellers', 'page']); _paq.push(['setCustomVariable', 1, _session , window.location.href,'page']); _paq.push(['trackLink']);"><span>Add to Compare</span></a>
						     <a class="remove-to-compare" id="<?php echo "galleryremove-" . $reco_item_sku; ?>"><span>Remove from Comparison</span></a>
						  <?php else: ?>
						     <a class="add-to-compare" id="<?php echo "galleryadd-" . $reco_item_sku; ?>" onclick="javascript:_paq.push(['setCustomVariable', 3, _session, 'Add to Compare , <?php echo $sku; ?> , maitai gallery-page , bestsellers', 'page']); _paq.push(['setCustomVariable', 1, _session , window.location.href,'page']); _paq.push(['trackLink']);"><span>Add to Compare</span></a>
						     <a class="remove-to-compare" id="<?php echo "galleryremove-" . $reco_item_sku; ?>" style="display:none;"><span>Remove from Comparison</span></a>
						  <?php endif;?>
						<?php endif;?>


        <script type="text/javascript">
	jQuery(document).ready(function() {
	   jQuery('#<?php echo "galleryremove-" . $reco_item_sku; ?>').click(function(){

	     var sku = "<?php echo $reco_item_sku; ?>";
	     var maitaicompare1 = getCookie("maitaicompare1");
	     var maitaicompare2 = getCookie("maitaicompare2");
	     var maitainumbercompare = getCookie("maitainumbercompare");

	     if(maitainumbercompare=="1") {
	       document.cookie="maitainumbercompare=" + "0" + "; path=/";
	       
	       if(sku==maitaicompare1){
			document.cookie="maitaicompare1=" + "" + "; path=/";
		 	document.cookie="maitaicompare2=" + "" + "; path=/";
		 	window.location=location.href;
	       } 

	     }
		
	     if(maitainumbercompare=="2") {
	       document.cookie="maitainumbercompare=" + "1" + "; path=/";
	       
	       if(sku==maitaicompare1){
			 document.cookie="maitaicompare1=" + maitaicompare2 + "; path=/";
			 document.cookie="maitaicompare2=" + "" + "; path=/";
	       } 

	       if(sku==maitaicompare2)
		 	document.cookie="maitaicompare2=" + "" + "; path=/";	     
	     		window.location=location.href;
	     } 
 
	   });
	});
	</script>

						</div>
						            
						</li>
            						
					<?php endforeach; ?>
					</ul>
				
            	<p class="gallery-nav box-title gale-nav" style="display:none"></p>	
		       	</div>
		       	

			   <div id="b-recently-viewed" style="display:none">
			   	<ul class="products-grid" style="width: 928px !important; margin: 0px; padding: 0px; position: relative; list-style-type: none; z-index: 1; left: 0px;">
								</ul>
			       <p class="gallery-nav box-title gale-nav" style="display:none"></p>
					<script type="text/javascript">
       jQuery('a#a-recently-viewed').hide();
	jQuery('a#b-recently-viewed').hide();
       jQuery('span#sep').hide();
       </script>
		          </div>

		          
		       </div>

		</div>
	</div>
<?php endif; ?>    
    
    
    
              
                              <!-- AddThis Button BEGIN -->
	<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4f33654630dd1177"></script>
	<!-- AddThis Button END -->   


<style>

.addthis_32x32_style .dummy .at300bs, .addthis_32x32_style .at300bs, .addthis_32x32_style .at15t, 
	.addthis_32x32_style .at15nc.at300bs, .addthis_32x32_style .at15nc.at15t, .addthis_32x32_style span { background: none !important; }

</style>
	<script type="text/javascript" src="<?php echo base_url('skin/js/specification.js'); ?>"></script>